package cn.ceplc.nlu.admin.service.impl;

import cn.ceplc.nlu.admin.domain.Menu;
import cn.ceplc.nlu.admin.repository.MenuRepository;
import cn.ceplc.nlu.admin.service.MenuService;
import cn.ceplc.nlu.base.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuServiceImpl extends BaseServiceImpl<Menu, Long> implements MenuService {


    private MenuRepository menuRepository;

    @Autowired
    public void setMenuRepository(MenuRepository menuRepository) {
        this.baseRepository = menuRepository;
        this.menuRepository = menuRepository;
    }

    @Override
    public List<Menu> findByRoleId(Long id) {
        return menuRepository.findByRoleId(id);
    }
}
